rational: rational.o main.o
	g++ -Werror rational.o main.o -o rational

main.o: main.cpp rational.h
	g++ -Werror -c main.cpp -o main.o

rational.o: rational.cpp rational.h
	g++ -Werror -c rational.cpp -o rational.o

clean:
	rm -f *.o rational

default: rational

.PHONY : clean
